home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 12 / Developer Source Volume 12 (I-MODE Publications, Inc.)(1999).iso / visua / nov97 / masof110.gif < prev    next >
Graphics Interchange Format  |  1998-06-08  |  47KB  |  587x356  |  4-bit (16 colors)
Labels: text | screenshot | number | font | document | parallel
OCR: Output Stream Description OutputStream Base abstract class for all output streams. Defines an overloaded write method and a flush method, although it provides no implementation for either. ByteArrayOutputStream When written to, it writes bytes to successive elements of an array of bytes. FileOutputStream When written to, it writes data out to a file on the local file system. Create one by passing the name of a file, a File object, or a FileDescriptor object. SocketOutputStream When written to, it writes bytes out to a network socket. A SocketinputStream connected to the other side of the network socket could then perform a read and got back the same bytes that were just written, in the same order. PipedOutputStream PipedOutputStreams are connected directly with one or more PipedinputStreams within the some Java Virtual Machine. When you write to the PipedinputStream, the bytes are immediately handed over to any PipedinputStreams connected to the same PipedOutputStream. FilterOutputStream Base class for any filtered output stream. When written to, writes bytes to an encapsulated OutputStream's write method. A FilterOutputStream may either transform, translate, or measure a stream of bytes, in much the same way a FilterInputStream may to the same operations BufferedOutputStream A simple type of FilterOutputStream. It keeps an internal buffer of bytes that have been written to it. When the buffer fills, all bytes in the buffer are transferred to the encapsulated OutputStream at once. This combines multiple smaller write operations into a lower number of writes. DataOutputStream This translating FilferOutputStream is the symmetric equivalent to the DatainputStream The methods such as writeBoolean, writelnt, and writeUTF write out pieces of data as sets of bytes to the encapsulated OutputStream. Data written out with a DataOutputStream can be read back in with a DatainputStream at a later time. Figure 10: The various types of output streams.